<?php

require_once ('Zend\Form.php');

class Application_Form_AddAlbum extends Zend_Form {
	
	public function init() {
		// Set the method for the display form to POST
		$this->setMethod ( 'post' );		
		$this->setOptions(array('id'=>'albumForm'));
		
		
		// Add an album name element
		$this->addElement ( 'text', 
			'name', 
			array ('label' => '相册名册:', 
				'required' => true, 
				'filters' => array ('StringTrim' ), 
				'validators' => array (array ('validator' => 'StringLength', 'options' => array (1, 50 ) ) ) ) );
		
		// Add the album  element
		$this->addElement ( 'text', 
			'desc', 
			array ('label' => '相册描述:', 
			'required' => false, 
			'validators' => array (array ('validator' => 'StringLength', 'options' => array (0, 100 ) ) ) ) );

			// Add the submit button
		$this->addElement ( 'submit', 'submit', array ('ignore' => true, 'label' => '创建相册' ) );

	}
}

